package extreme.tddscaffold;

public class GeneralMerchandise {

        private int sellIn;
        private int quality;
        private String name;

        public void GeneralMerchandise(String name, int sellIn, int quality) {
            this.name = name;
            this.sellIn = sellIn;
            this.quality = quality;

        }

        public void GeneralMerchandise() {

        }

    public int CommodityPrice() {

        if (name == "GeneralMerchandise") {
            if(sellIn>=0){
                for (int i = 0; i <sellIn ; i++) {
                    quality=quality-1;

                }
            return quality;
            }else {
                for (int i = 0; i <0-sellIn ; i++) {
                    quality=quality-2;

                }
                return quality;
            }
        }
     return quality;
    }
    }
